\hypertarget{classc_terrain}{\section{c\-Terrain类 参考}
\label{classc_terrain}\index{c\-Terrain@{c\-Terrain}}
}


用三张纹理图，一张混合图，一张高度图，创建地形。  




{\ttfamily \#include $<$c\-Terrain.\-h$>$}

\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classc_terrain_af7bdc05fe8b5ef8c3e0e2ce9aa386bef}{init} (\hyperlink{classc_render}{c\-Render} $\ast$p\-Render, \hyperlink{struct_terrain}{Terrain} terrain, string Height\-Map, string Stone\-Tex, string Grass\-Tex, string Dirt\-Tex, string Blend\-Map, float Height\-Scal, float Height\-Offset, string Fx\-Name=\char`\"{}Terrain.\-fx\char`\"{})
\item 
\hypertarget{classc_terrain_a1afbf85773459c997ebb93e08d0242db}{void {\bfseries draw} (D3\-D\-X\-M\-A\-T\-R\-I\-X \&world, D3\-D\-X\-M\-A\-T\-R\-I\-X \&view, D3\-D\-X\-M\-A\-T\-R\-I\-X \&proj, D3\-D\-X\-V\-E\-C\-T\-O\-R3 Light\-Dir=D3\-D\-X\-V\-E\-C\-T\-O\-R3(0, 1, 0), float Ambient\-Essentially=1.\-0f)}\label{classc_terrain_a1afbf85773459c997ebb93e08d0242db}

\item 
\hypertarget{classc_terrain_a984f8165e4d3bab98148a2d02adc07fb}{float \hyperlink{classc_terrain_a984f8165e4d3bab98148a2d02adc07fb}{get\-Y} (float x, float z)}\label{classc_terrain_a984f8165e4d3bab98148a2d02adc07fb}

\begin{DoxyCompactList}\small\item\em 给出x,z;得到高度y。 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public 属性}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classc_terrain_a04e07a34583ee60050ca8642f01be5e8}{\hyperlink{struct_terrain}{Terrain} {\bfseries m\-\_\-\-Terrain}}\label{classc_terrain_a04e07a34583ee60050ca8642f01be5e8}

\end{DoxyCompactItemize}
\subsection*{Protected 成员函数}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classc_terrain_ab2dbf56bc13db8b4e6f64bd9bec79fd9}{void {\bfseries shader\-\_\-draw} ()}\label{classc_terrain_ab2dbf56bc13db8b4e6f64bd9bec79fd9}

\end{DoxyCompactItemize}
\subsection*{Protected 属性}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classc_terrain_a647312e8a8660ea85aac8ebce42bf7b9}{\hyperlink{classc_height_map}{c\-Height\-Map} {\bfseries m\-\_\-\-Height\-Map\-Object}}\label{classc_terrain_a647312e8a8660ea85aac8ebce42bf7b9}

\item 
\hypertarget{classc_terrain_a3e1987eceda1bb92af4c758e0fcf5f17}{\hyperlink{classc_vertex_decl}{c\-Vertex\-Decl} $\ast$ {\bfseries m\-\_\-p\-Vertex\-Decl}}\label{classc_terrain_a3e1987eceda1bb92af4c758e0fcf5f17}

\item 
\hypertarget{classc_terrain_af964382aa0b38fc8de7c3c30a1a8aa9f}{\hyperlink{classc_fx}{c\-Fx} $\ast$ {\bfseries m\-\_\-p\-Fx}}\label{classc_terrain_af964382aa0b38fc8de7c3c30a1a8aa9f}

\item 
\hypertarget{classc_terrain_abf6d1f7f13ef26aef3e48c2df9a0d54a}{\hyperlink{classc_ground}{c\-Ground} $\ast$ {\bfseries m\-\_\-p\-Ground}}\label{classc_terrain_abf6d1f7f13ef26aef3e48c2df9a0d54a}

\end{DoxyCompactItemize}


\subsection{详细描述}
用三张纹理图，一张混合图，一张高度图，创建地形。 

\begin{DoxyRemark}{备注}
只能通过\-Shader渲染。依赖c\-Ground。 
\end{DoxyRemark}


\subsection{成员函数说明}
\hypertarget{classc_terrain_af7bdc05fe8b5ef8c3e0e2ce9aa386bef}{\index{c\-Terrain@{c\-Terrain}!init@{init}}
\index{init@{init}!cTerrain@{c\-Terrain}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}void c\-Terrain\-::init (
\begin{DoxyParamCaption}
\item[{{\bf c\-Render} $\ast$}]{p\-Render, }
\item[{{\bf Terrain}}]{terrain, }
\item[{string}]{Height\-Map, }
\item[{string}]{Stone\-Tex, }
\item[{string}]{Grass\-Tex, }
\item[{string}]{Dirt\-Tex, }
\item[{string}]{Blend\-Map, }
\item[{float}]{Height\-Scal, }
\item[{float}]{Height\-Offset, }
\item[{string}]{Fx\-Name = {\ttfamily \char`\"{}Terrain.fx\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{classc_terrain_af7bdc05fe8b5ef8c3e0e2ce9aa386bef}

\begin{DoxyParams}{参数}
{\em Height\-Scal,\-:} & 高度数据乘\-Height\-Scal。 \\
\hline
{\em Height\-Offset,\-:} & 高度数据加\-Height\-Offset。 \\
\hline
{\em Fx\-Name,\-:} & 地形的特效文件。 \\
\hline
\end{DoxyParams}


该类的文档由以下文件生成\-:\begin{DoxyCompactItemize}
\item 
E\-:/!代码工厂/3\-D引擎/c\-Terrain.\-h\item 
E\-:/!代码工厂/3\-D引擎/c\-Terrain.\-cpp\end{DoxyCompactItemize}
